package com.wis.service.impl;

import com.wis.entity.UserEntity;
import com.wis.mapper.UserMapper;
import com.wis.service.UserService;
import com.wis.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public CommonResult selectUser(String email, String password) {
        UserEntity userEntity = userMapper.login(email, password);
        if(userEntity!=null){
            return CommonResult.build(200,"管理员账号密码正确",1,null);
        }else{
            return CommonResult.build(500,"管理员账号密码错误",0,null);
        }
    }
}
